package com.ppc.mapper.user;

import com.ppc.entity.File;
import com.ppc.entity.UserPPC;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 用户mapper
 *
 * @author jianKangS1
 * @date 2023/12/20
 */
@Mapper
public interface UserMapper {

  @Update("update userppc set user_email=null , user_phone=null where user_id=#{userId}")
  void unregisterUser(Long userId);

  List<UserPPC> getUserByPhoneOrEmail(@Param("phone") String phone, @Param("email") String email);

  void insertUserPPC(UserPPC userPPC);

  @Select("select * from file where file_name=#{filename}")
  File checkFileExist(String filename);
}
